package examples.lesson3.exceptions;


public class Manager
{

	public static void main(String[] args)
	{
		int x = 4;
		int y = 2;

		int m[] = { 1, 2, 3 };
		int index = 7;

		int div = 0;

		try
		{
			m[index] = x / y;
			System.out.println(m[index]);
		}
		catch (ArithmeticException ex)
		{
			System.out.println("Can't divide to 0");
		}
		catch (ArrayIndexOutOfBoundsException ex)
		{
			System.out.println("Index " + index + " doen't exist");
		}
		catch (Exception ex)
		{
			System.out.println("Another exception");
		}
		finally
		{
			System.out.println("Final");
		}

		System.out.println("test");

	}
}
